#ifndef msg_mark_h
#define msg_mark_h

// export interface.
#ifdef __cplusplus
extern "C" {
#endif

#ifdef dynamic
#define MYAPI __declspec(dllexport)
#else
#define MYAPI __declspec(dllimport)
#endif

struct msg_markTag;

// return NULL if failure.
MYAPI struct msg_markTag* init_msg_mark(const char* filename);

MYAPI void release_msg_mark(struct msg_markTag* obj);

// import __FILE__ and __LINE__
#include <windows.h>
MYAPI void _mark(struct msg_markTag* obj , const unsigned int code, const char* msg, const char* szFile, unsigned int uLine);
#define mark_msg(obj, code, msg) _mark(obj, code, msg, __FILE__, __LINE__)

#ifdef __cplusplus
}
#endif

#endif
